package youbff.cloud.router.config.custom.bean;import org.apache.shiro.cache.Cache;import org.apache.shiro.cache.CacheException;import org.apache.shiro.cache.CacheManager;import org.springframework.data.redis.core.RedisTemplate;/** * shiro redis 管理 * @author lixuefeng * @email youbff@163.com * @time 2017年11月12日 下午5:53:37 */public class RedisCacheManager implements CacheManager {        private RedisTemplate<String, Object> redisTemplate;    @Override    public <K, V> Cache<K, V> getCache(String name) throws CacheException {        return new ShiroCache<K, V>(name, redisTemplate);    }        public RedisTemplate<String, Object> getRedisTemplate() {        return redisTemplate;    }    public void setRedisTemplate(RedisTemplate<String, Object> redisTemplate) {        this.redisTemplate = redisTemplate;    }}